package org.dromara.system.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.dromara.system.domain.AppOrder;
import org.dromara.system.domain.vo.AppOrderVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

/**
 * 订单Mapper接口
 *
 * @author Lion Li
 * @date 2025-09-12
 */
public interface AppOrderMapper extends BaseMapperPlus<AppOrder, AppOrderVo> {


    /**
     * 根据订单ID查询订单并加行锁
     */
    @Select("SELECT * FROM app_order WHERE order_id = #{orderId} FOR UPDATE")
    AppOrderVo selectByIdForUpdate(@Param("orderId") String orderId);
}
